<?php
/* @var $this OptionsController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Upload设置',
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('options/upload')?>">上传设置</a></li>
        <li class="active">更新</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>编辑上传设置
            <small><i class="ace-icon fa fa-angle-double-right"></i> Update Upload Setting</small>
        </h1>
    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">

            <!-- PAGE CONTENT BEGINS -->
            <?php $form = $this->beginWidget('CActiveForm', array(
                'id'=>'myForm',
                'enableAjaxValidation'=>true,
                'enableClientValidation'=>true,
                'focus'=>array($model,'upload_max_size'),
                'htmlOptions'=>array('class'=>'form-horizontal'),
            )); ?>
            <?php echo $form->errorSummary($model); ?>
            <div class="form-group">
                <?php echo $form->label($model,'upload_max_size', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->textField($model,'upload_max_size', array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> KB</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_allow_ext', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->textField($model,'upload_allow_ext', array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 用英文逗号隔开</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_water_status', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->dropDownList($model,'upload_water_status', array('1'=>'开启','0'=>'关闭'),array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 开启之后的配置才生效</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_water_file', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->textField($model,'upload_water_file', array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 默认：resource/frontend/images/water.png</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_water_scope', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->textField($model,'upload_water_scope', array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 图片小于该尺寸不加水印</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_water_position', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->dropDownList($model,'upload_water_position',array('0'=>'右下','1'=>'左上','2'=>'左下','3'=>'右上','4'=>'中间','5'=>'随机'),array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 水印位置</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_water_padding', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->textField($model,'upload_water_padding',array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 水印间距</span></div>
            </div>
            <div class="form-group">
                <?php echo $form->label($model,'upload_water_trans', array('class'=>'col-sm-2 control-label')); ?>
                <div class="col-sm-8">
                    <?php echo $form->textField($model,'upload_water_trans',array('class'=>'form-control')) ?>
                </div>
                <div class='col-sm-2'><span class='tips'> <i class='fa fa-info-circle'></i> 1~100之间，越小越透明</span></div>
            </div>

            <div class="hr hr-18 dotted"></div>
            <div class="clearfix">
                <div class="col-md-offset-2 col-md-10">
                    <button class="btn btn-white btn-info btn-round" type="submit"><i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>保存</button>
                    &nbsp;
                    <button class="btn btn-white btn-default btn-round" type="reset"><i class="ace-icon fa fa-times red2"></i>取消</button>
                </div>
            </div>
            <?php $this->endWidget(); ?>
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->

